<%@ page language="java" contentType="text/html;charset=utf-8"
	pageEncoding="utf-8"%>
<%@ page import="com.sms.project.*"%>
<%@ page import="net.sf.json.*" %>

<%--
	project/headman/del-report.jsp
 --%>

<%
	String msg = "";
	String action = request.getParameter("action");
	String row = request.getParameter("row");
	if (action != null & action.trim().equals("delete")) {
		String[] delID = request.getParameterValues("delID");
		if(delID.length == 0) {
			msg = "error";
		} else {
			boolean isSuccess = Task.delReport(delID);//is delete success?
			if(isSuccess) {
				msg = "ok";
			} else {
				msg = "error";
			}
		}
		
	} else {
		msg = "error";
	}
	
	msg = msg.replace("/rn/g", "");//去掉产生的换行
	JSONArray json = new JSONArray();
	JSONObject j = new JSONObject();
	j.put("text", msg);
	j.put("row", row);
	json.add(j);
	
	out.clear();
	out.println(json);
%>